<script setup>
import { ref,onMounted,reactive } from 'vue';
import {useRoute} from 'vue-router'
// 头部组件
import AuditHeader from '../../components/header/AuditHeader.vue';
// 用户信息组件
import UserDetail from '../../components/audit/user/UserDetail.vue';
// 审核详情
import DataTable from '../../components/audit/table/DataTable.vue';

import useInfoStore from '@/store/user.js'

const infoStore = useInfoStore()

const initData = (id) => {
  infoStore.getUserInfo(id)
}

const route = useRoute()
onMounted(()=>{
  initData(route.query.id)
})
// 头部
const text = ref('审核平台-审核页')

// 用户信息
const userData = reactive({
  username:route.query.username,
  id:route.query.id,
})

</script>

<template>
  <AuditHeader :text="text"></AuditHeader>
  <div class="main">
    <div class="main-user">
      <UserDetail :userData="userData"></UserDetail>
    </div>
    <div class="main-table">
      <DataTable ></DataTable>
    </div>
  </div>

</template>

<style lang="less" scoped>
  .main{
    height: 85vh;
    .main-user{
      height: 15vh;
    }
    .main-table{
      height: 70vh;
    }
  }
</style>
